When using many computing systems and/or computing system implemented processes, a value is entered and/or edited and/or displayed in one numbering system such as a first system of units or number base, typically in an ASCII/text decimal form. Then the value is stored in a second numbering system, such as a second system of units or number base, typically in a binary format. The value is then later accessed and/or recalled for processing and/or display again in the first numbering system. This process of entering and/or editing a value in one numbering system, storing the value in a second numbering system, and then recalling the value in the first numbering system, is often referred to as “round-tripping”.
During round-tripping, the conversion or “scaling” of the initial value between the two numbering systems often results in discrepancies that can appear to users as errors and/or as cumbersome numerical values with little or no physical relevance. This error introduced by round-tripping is referred to herein as one example of “rounding error”.
Due to round-tripping and rounding error, it is often the case that when a value is entered and/or edited in one unit of measure, such as inches, and then stored in a second unit of measure, such as feet, and then again recalled and/or displayed in the first unit of measure, the recalled value eventually displayed or subjected to further processing, also called a display value, does not match the value initially entered and/or edited.
As a specific example, suppose a user enters and/or edits an initial value 0.25 inches into a computing system, typically in an ASCII/text decimal form, running a computing system implemented process, such as a computing system implemented point of sale application. For this example, assume the computing system implemented point of sale application stores all values in units of feet. Consequently, in this example, the initial value 0.25 inches is multiplied by the scaling ratio (1 foot/12 inches or 0.0833333) to obtain a stored value of 0.02083 feet, which is the correct conversion of the initial value 0.25 inches using four significant digits. The stored value of 0.02083 feet is typically stored in a binary format
In this specific example, once the initial value of 0.25 inches is converted to the stored value of 0.02083 feet, it is further stipulated that the user calls up the value to be displayed again, or to be further processed as a display value in the unit of inches. In this case, the stored value 0.02083 feet is then multiplied by the scaling ratio (12 inches/1 foot or 12.000), which is the reciprocal of the original scaling ratio. However, this operation results in a recalled value of 0.24997 inches. Given that when the recalled value of 0.24997 inches is multiplied by the scaling ratio (1 foot/12 inches), the exact same stored value of 0.02083 feet results, it follows that the recalled value of 0.24997 inches is technically correct. However, as discussed above, the entered initial value of 0.25 inches also results in the stored value of 0.02083 feet and is a much more useful and aesthetically pleasing representation of the stored value and, in many cases more accurately reflects physical realities/capabilities.
The rounding error associated with round-tripping discussed above is not restricted to units of measure. The problem arises anytime a value is scaled using finite precision arithmetic, i.e., with limited precision. Consequently, the rounding error problem is equally prevalent anytime an initial value is entered and/or edited in one numbering system, converted to a stored value in a second numbering system, and then converted back to a recalled value in the first numbering system, such as: when two number bases are used, such as a decimal (base ten) system and a binary (base two) system; when a metric system and an American system are used; when different monetary systems are used; or when different sales, inventory and/or packaging units are used.